(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

active(f(X)) → mark(if(X, c, f(true)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(f(X)) → f(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(if(X1, X2, X3)) → if(X1, active(X2), X3)
f(mark(X)) → mark(f(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(X1, mark(X2), X3) → mark(if(X1, X2, X3))
proper(f(X)) → f(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
proper(c) → ok(c)
proper(true) → ok(true)
proper(false) → ok(false)
f(ok(X)) → ok(f(X))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of top: proper, active
The following defined symbols can occur below the 0th argument of proper: proper, active
The following defined symbols can occur below the 0th argument of active: proper, active

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
active(f(X)) → mark(if(X, c, f(true)))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(f(X)) → f(active(X))
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
active(if(X1, X2, X3)) → if(X1, active(X2), X3)
proper(f(X)) → f(proper(X))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

proper(true) → ok(true)
top(ok(X)) → top(active(X))
proper(c) → ok(c)
proper(false) → ok(false)
f(mark(X)) → mark(f(X))
f(ok(X)) → ok(f(X))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
top(mark(X)) → top(proper(X))
if(X1, mark(X2), X3) → mark(if(X1, X2, X3))

Rewrite Strategy: INNERMOST

(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4]
transitions:
true0() → 0
ok0(0) → 0
active0(0) → 0
c0() → 0
false0() → 0
mark0(0) → 0
proper0(0) → 1
top0(0) → 2
f0(0) → 3
if0(0, 0, 0) → 4
true1() → 5
ok1(5) → 1
active1(0) → 6
top1(6) → 2
c1() → 7
ok1(7) → 1
false1() → 8
ok1(8) → 1
f1(0) → 9
mark1(9) → 3
f1(0) → 10
ok1(10) → 3
if1(0, 0, 0) → 11
mark1(11) → 4
if1(0, 0, 0) → 12
ok1(12) → 4
proper1(0) → 13
top1(13) → 2
ok1(5) → 13
ok1(7) → 13
ok1(8) → 13
mark1(9) → 9
mark1(9) → 10
ok1(10) → 9
ok1(10) → 10
mark1(11) → 11
mark1(11) → 12
ok1(12) → 11
ok1(12) → 12
active2(5) → 14
top2(14) → 2
active2(7) → 14
active2(8) → 14

(4) BOUNDS(1, n^1)

(5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
top(ok(z0)) → top(active(z0))
top(mark(z0)) → top(proper(z0))
f(mark(z0)) → mark(f(z0))
f(ok(z0)) → ok(f(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
if(z0, mark(z1), z2) → mark(if(z0, z1, z2))
Tuples:

PROPER(true) → c1
PROPER(c) → c2
PROPER(false) → c3
TOP(ok(z0)) → c4(TOP(active(z0)))
TOP(mark(z0)) → c5(TOP(proper(z0)), PROPER(z0))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
S tuples:

PROPER(true) → c1
PROPER(c) → c2
PROPER(false) → c3
TOP(ok(z0)) → c4(TOP(active(z0)))
TOP(mark(z0)) → c5(TOP(proper(z0)), PROPER(z0))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
K tuples:none
Defined Rule Symbols:

proper, top, f, if

Defined Pair Symbols:

PROPER, TOP, F, IF

Compound Symbols:

c1, c2, c3, c4, c5, c6, c7, c8, c9, c10

(7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

TOP(ok(z0)) → c4(TOP(active(z0)))
PROPER(false) → c3
PROPER(c) → c2
PROPER(true) → c1

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
top(ok(z0)) → top(active(z0))
top(mark(z0)) → top(proper(z0))
f(mark(z0)) → mark(f(z0))
f(ok(z0)) → ok(f(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
if(z0, mark(z1), z2) → mark(if(z0, z1, z2))
Tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)), PROPER(z0))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
S tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)), PROPER(z0))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
K tuples:none
Defined Rule Symbols:

proper, top, f, if

Defined Pair Symbols:

TOP, F, IF

Compound Symbols:

c5, c6, c7, c8, c9, c10

(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
top(ok(z0)) → top(active(z0))
top(mark(z0)) → top(proper(z0))
f(mark(z0)) → mark(f(z0))
f(ok(z0)) → ok(f(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
if(z0, mark(z1), z2) → mark(if(z0, z1, z2))
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
K tuples:none
Defined Rule Symbols:

proper, top, f, if

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(11) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

top(ok(z0)) → top(active(z0))
top(mark(z0)) → top(proper(z0))
f(mark(z0)) → mark(f(z0))
f(ok(z0)) → ok(f(z0))
if(mark(z0), z1, z2) → mark(if(z0, z1, z2))
if(ok(z0), ok(z1), ok(z2)) → ok(if(z0, z1, z2))
if(z0, mark(z1), z2) → mark(if(z0, z1, z2))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
K tuples:none
Defined Rule Symbols:

proper

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

TOP(mark(z0)) → c5(TOP(proper(z0)))
We considered the (Usable) Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
And the Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = 0   
POL(IF(x1, x2, x3)) = 0   
POL(TOP(x1)) = x1   
POL(c) = 0   
POL(c10(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c8(x1)) = x1   
POL(c9(x1)) = x1   
POL(false) = 0   
POL(mark(x1)) = [1]   
POL(ok(x1)) = 0   
POL(proper(x1)) = 0   
POL(true) = 0   

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
K tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)))
Defined Rule Symbols:

proper

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = 0   
POL(IF(x1, x2, x3)) = x3   
POL(TOP(x1)) = 0   
POL(c) = 0   
POL(c10(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c8(x1)) = x1   
POL(c9(x1)) = x1   
POL(false) = 0   
POL(mark(x1)) = 0   
POL(ok(x1)) = [1] + x1   
POL(proper(x1)) = 0   
POL(true) = 0   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
K tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
Defined Rule Symbols:

proper

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = x1   
POL(IF(x1, x2, x3)) = x1   
POL(TOP(x1)) = 0   
POL(c) = 0   
POL(c10(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c8(x1)) = x1   
POL(c9(x1)) = x1   
POL(false) = 0   
POL(mark(x1)) = [1] + x1   
POL(ok(x1)) = [1] + x1   
POL(proper(x1)) = 0   
POL(true) = 0   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:

IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
K tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
Defined Rule Symbols:

proper

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(19) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
We considered the (Usable) Rules:none
And the Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(F(x1)) = 0   
POL(IF(x1, x2, x3)) = x2   
POL(TOP(x1)) = 0   
POL(c) = 0   
POL(c10(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1)) = x1   
POL(c8(x1)) = x1   
POL(c9(x1)) = x1   
POL(false) = 0   
POL(mark(x1)) = [1] + x1   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(true) = 0   

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

proper(true) → ok(true)
proper(c) → ok(c)
proper(false) → ok(false)
Tuples:

F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
TOP(mark(z0)) → c5(TOP(proper(z0)))
S tuples:none
K tuples:

TOP(mark(z0)) → c5(TOP(proper(z0)))
IF(ok(z0), ok(z1), ok(z2)) → c9(IF(z0, z1, z2))
F(mark(z0)) → c6(F(z0))
F(ok(z0)) → c7(F(z0))
IF(mark(z0), z1, z2) → c8(IF(z0, z1, z2))
IF(z0, mark(z1), z2) → c10(IF(z0, z1, z2))
Defined Rule Symbols:

proper

Defined Pair Symbols:

F, IF, TOP

Compound Symbols:

c6, c7, c8, c9, c10, c5

(21) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(22) BOUNDS(1, 1)